<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //函数定义
        function he(){
            var sum=0;
            for(var i in arguments){
                sum =sum+arguments[i];//求参数类表的和
            }
            return sum;
        }
        //函数调用
        console.log(he(1,2,3,4,5));//15
    </script>
</head>
<body>
    
</body>
</html>